package csc.daonjpa.java.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import csc.daonjpa.java.dao.TransactionDAO;
import csc.daonjpa.java.domain.Transactions;

public class TransactionService {
	
	private TransactionDAO transactionDAO;

	public TransactionDAO getTransactionDAO() {
		return transactionDAO;
	}
	@Autowired
	public void setTransactionDAO(TransactionDAO transactionDAO) {
		this.transactionDAO = transactionDAO;
	}
	
	public boolean addTransaction(Transactions transaction) {
		return transactionDAO.addTransaction(transaction);
	}
	
	public List<Transactions> getTransactions() {
		return transactionDAO.getTransactions();
	}
	public List<Transactions> getTransactionByAccount(Long idNumber) {
		return transactionDAO.getTransactionByAccount(idNumber);
	}
}
